package Day9;

import java.util.Arrays;

public class Test3 {
    public boolean IsContinuous (int[] numbers) {
        // write code here
        Arrays.sort(numbers);
        int right = 4;
        int left = 0;
        for(int i = 0;i < 4;i++){
            if(numbers[i] != 0){
                left = i;
                break;
            }
        }
        for(int i = 0;i < 4;i++){
            if(numbers[i] == numbers[i + 1] && numbers[i] != 0){
                return false;
            }
        }
        return numbers[right] - numbers[left] <= 4;
    }
}
